<?php
class information{
	public function init($params=array()){
		$this->db=$this->yum->library('mysql');
		$this->prefix=$this->yum->vars('app','prefix');
	}
	public function GMation($params=array()){
	 	return $this->db->select($this->prefix.'information',$params);
	}
	public function GMationFull($params=array()){
		$table=$this->prefix.'information AS A';
    	$table.=' LEFT JOIN '.$this->prefix.'member AS B ON A.member=B.id';
    	if(!isset($params['select'])){
    		$params['select']='A.member,B.mail,A.account,B.locked';
    	}
    	return $this->db->select($table,$params);
	}
	public function IMation($params){
		return $this->db->insert($this->prefix.'information',$params);
	}
	public function UMation($params){
		return $this->db->update($this->prefix.'information',$params);
	}
}
?>